Page({
    data: {
      id: 0,
      mapUrl: "",
      lesson:[],
      lesson_length:0
    },
    onLoad: function (option) {
      this.setData({
        mapUrl:"https://listen-static-1304132537.cos.ap-shanghai.myqcloud.com/%E6%89%8B%E6%8A%8A%E6%89%8B%E5%85%A5%E9%97%A8java%20%E8%AF%BE%E7%A8%8B%E6%A6%82%E8%BF%B0.mp4"
      });
      this.getLessonList(option.id);
    },
    bindBuyTap: function() {
        wx    .navigateTo({
          url: '../buy/buy'
        })
      },
      getLessonList: function(id) {
        var that = this;
        wx.request({
          url: `http://1.15.55.133:8080/live/detail?liveid=${id}`,
          success(res){
          console.log("lesson",res.data);
          that.setData({
            id: id,
            lesson: res.data.data
          })
  }

          /*
          success(res) {
            console.log("getLessonLists: ", res);
            that.setData({//获取数据 更新列表
              lesson: res.data.data          
            })
          }*/
        })
      },
  })
  





